package com.itheima.thread.threadPool.executorService;

/**
 * @Author: Ethan Yankang
 * @Program: Interview
 * @Date: 2024-08-15 18:49
 **/
public class MyRunnable implements Runnable {
    private int id;

    public MyRunnable(int id) {
        this.id=id;
    }

    @Override
    public void run() {
//        获取线程名称，打印一句话
        String name = Thread.currentThread().getName();
        System.out.println(name+"执行了任务。。。"+id);
    }
}
